package com.gz.mylife.im;

import java.io.Serializable;

import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Property;
import net.tsz.afinal.annotation.sqlite.Table;
import net.tsz.afinal.annotation.sqlite.Transient;

@Table(name = "tb_session")
public class SessionBean implements Serializable,Cloneable{

	@Transient
	private static final long serialVersionUID = -5817463970761993721L;
	@Transient
	public static final int PMID_FOLLOW= - 10;
	@Transient
	public static final int PMID_COMMENT= - 11;  
	
	@Id
	private int id;
	@Property
	private int pmid;
	@Property
	private int msgid;
	@Property
	private String content;
	@Property
	private int fuid;
	@Property
	private int gender;
	@Property
	private String nickname;
	@Property
	private String face;
	@Property
	private long dateline;
	@Property
	private int funreadnum;
	@Property
	private int unreadCount;
	@Property
	private int currentUID;
	@Property
	private int showStatus;//0为显示，1为不显示
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof SessionBean){
			SessionBean msg = (SessionBean) obj;
			return pmid == msg.pmid;
		} else {
			return false;
		}
	}
	
	
	public int getShowStatus() {
		return showStatus;
	}


	public void setShowStatus(int showStatus) {
		this.showStatus = showStatus;
	}


	public int getPmid() {
		return pmid;
	}

	public void setPmid(int pmid) {
		this.pmid = pmid;
	}
	
	public int getUnreadCount() {
		return unreadCount;
	}

	public void setUnreadCount(int unreadCount) {
		this.unreadCount = unreadCount;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public int getFuid() {
		return fuid;
	}

	public void setFuid(int fuid) {
		this.fuid = fuid;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getFace() {
		return face;
	}

	public void setFace(String face) {
		this.face = face;
	}

	public long getDateline() {
		return dateline;
	}

	public void setDateline(long dateline) {
		this.dateline = dateline;
	}
	
	public int getMsgid() {
		return msgid;
	}

	public void setMsgid(int msgid) {
		this.msgid = msgid;
	}
	public int getFunreadnum() {
		return funreadnum;
	}

	public void setFunreadnum(int funreadnum) {
		this.funreadnum = funreadnum;
	}
	

	public int getCurrentUID() {
		return currentUID;
	}

	public void setCurrentUID(int currentUID) {
		this.currentUID = currentUID;
	}

	@Override
	public String toString() {
		return "SessionBean [id=" + id + ", pmid=" + pmid + ", msgid=" + msgid
				+ ", content=" + content + ", fuid=" + fuid + ", gender="
				+ gender + ", nickname=" + nickname + ", face=" + face
				+ ", dateline=" + dateline + ", funreadnum=" + funreadnum
				+ ", unreadCount=" + unreadCount + "]";
	}
	
}
